package com.haima.ziliao.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haima.ziliao.mapper.PDuwuMapper;
import com.haima.ziliao.domain.PDuwu;
import com.haima.ziliao.service.IPDuwuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 读物资料Service业务层处理
 * 
 * @author hima
 * @date 2024-11-14
 */
@Service
public class PDuwuServiceImpl extends ServiceImpl<PDuwuMapper, PDuwu> implements IPDuwuService
{
    @Autowired
    private PDuwuMapper pDuwuMapper;

    /**
     * 查询读物资料
     * 
     * @param id 读物资料主键
     * @return 读物资料
     */
    @Override
    public PDuwu selectPDuwuById(Long id)
    {
        return pDuwuMapper.selectPDuwuById(id);
    }

    /**
     * 查询读物资料列表
     * 
     * @param pDuwu 读物资料
     * @return 读物资料
     */
    @Override
    public List<PDuwu> selectPDuwuList(PDuwu pDuwu)
    {
        return pDuwuMapper.selectPDuwuList(pDuwu);
    }

    /**
     * 新增读物资料
     * 
     * @param pDuwu 读物资料
     * @return 结果
     */
    @Override
    public int insertPDuwu(PDuwu pDuwu)
    {
        return pDuwuMapper.insertPDuwu(pDuwu);
    }

    /**
     * 修改读物资料
     * 
     * @param pDuwu 读物资料
     * @return 结果
     */
    @Override
    public int updatePDuwu(PDuwu pDuwu)
    {
        return pDuwuMapper.updatePDuwu(pDuwu);
    }

    /**
     * 批量删除读物资料
     * 
     * @param ids 需要删除的读物资料主键
     * @return 结果
     */
    @Override
    public int deletePDuwuByIds(Long[] ids)
    {
        return pDuwuMapper.deletePDuwuByIds(ids);
    }

    /**
     * 删除读物资料信息
     * 
     * @param id 读物资料主键
     * @return 结果
     */
    @Override
    public int deletePDuwuById(Long id)
    {
        return pDuwuMapper.deletePDuwuById(id);
    }

    @Override
    public List<PDuwu> getNews(PDuwu pDuwu) {
        return pDuwuMapper.getNews(pDuwu);
    }
}
